﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
using System.Drawing;
namespace DomesticPestProject
{
    public partial class frmLocation : System.Web.UI.Page
    {
        SqlConnection conn;
        SqlCommand cmd;
       // SqlDataReader reader;
        
        protected void Page_Load(object sender, EventArgs e)
        {
            btnMain.Enabled = false;
        }

        void connect()
        {
            conn = new SqlConnection();
            conn.ConnectionString = "Data Source=KAJAL-PC;Initial Catalog=DomesticPestDB;Integrated Security=True";
            conn.Open();
            cmd = new SqlCommand();
            cmd.Connection = conn;
            cmd.CommandType = CommandType.Text;
        }
        void disconnect()
        {
            //cmd.Dispose();
            //if (reader != null)
            //    reader.Close();
            //if (conn != null)
            //    conn.Close();
        }

        //protected void btnSave_Click(object sender, EventArgs e)
        //{
        //    try
        //    {
        //        connect();
        //        //string strradio = "";
        //        //if (rdFemale.Checked == true)
        //        //{
        //        //    strradio = rdFemale.Text;
        //        //}
        //        //else if(rdMale.Checked==true)
        //        //{
        //        //strradio=rdMale.Text;
        //        //}
        //        //int next = NextId();
        //        //cmd.CommandText = "INSERT INTO Country values('"+ "" +"','" + txtName.Text + "','" + "" + "')";
                
        //        cmd.ExecuteNonQuery();
        //        //mbox "";
        //        disconnect();
        //    }
        //    catch (Exception ex)
        //    {
        //            if (conn != null)
        //            conn.Close();
        //    }
        //    disconnect();
        //}

        protected void btnCommodity_Click(object sender, EventArgs e)
        {
            Response.Redirect("frmCommodity.aspx");
        }

        protected void btnInformation_Click(object sender, EventArgs e)
        {
            Response.Redirect("frmInformation.aspx");
        }

        protected void btnTransaction_Click(object sender, EventArgs e)
        {
            Response.Redirect("frmTransaction.aspx");
        }

        protected void btnPest_Click(object sender, EventArgs e)
        {
            Response.Redirect("frmPest.aspx");
        }

        protected void btnLctn_Click(object sender, EventArgs e)
        {
            Response.Redirect("frmLoc.aspx");
        }

        protected void btnPsDsrbtn_Click(object sender, EventArgs e)
        {
            Response.Redirect("frmPestDistribution.aspx");
        }

        protected void btnMain_Click(object sender, EventArgs e)
        {

        }

        protected void btnReport_Click(object sender, EventArgs e)
        {
            Response.Redirect("rptInformation.aspx");
        }

        }



    }

